﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Graphics;
namespace TE3
{
	public class FontManager
	{
		public Dictionary<string, SpriteFont> Fonts;
		private readonly Game _game;
		public FontManager(Game game)
		{
			_game = game;
			Fonts = new Dictionary<string, SpriteFont>();
		}
		public void LoadFont(string fontName)
		{
			try
			{
				Fonts.Add(fontName, _game.Content.Load<SpriteFont>(fontName));
			}
			catch(Exception e)
			{
				Console.WriteLine("Error loading font \""+ fontName + "\"");
				Console.WriteLine(e.Message);
			}
			Console.WriteLine("Font added: " + fontName);
		}
	}
}
